﻿<%@ Import Namespace="System.Data.OleDb" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.IO" %>

<script language="VB" runat="server">

    Dim TTT As String = "home"
    Public Sql As String = String.Concat("SELECT * FROM ALL_RSS WHERE RATE>", Integer.Parse(-4), " AND ADL=False") _
         , cmd As OleDbCommand = New OleDbCommand(Sql, global_asax.conn1) _
         , da As OleDbDataAdapter = New OleDbDataAdapter() _
         , ds As DataSet = New DataSet() _
         , Table As DataTable _
         , IRow As DataRow
    
    Function CheckBid() As Integer
        ' 
        Dim bid As String _
                = Request.Url.ToString _
          , value As Integer = -1
        '
        '------------
        '|  TAG`S   |
        '------------
        If global_asax.CheckTags2(bid, "spam") > 0 Then
            Try
                Dim [_tmp] As Integer = Integer.Parse(bid.Split("=")(1))
                HttpContext.Current.Session.Add("spam", [_tmp])
                Response.Redirect("[COM].ASPX")
            Catch ex As Exception
            End Try
        End If
        If global_asax.CheckTags2(bid, "NOTADULT") > 0 Then
            Try
                Dim [_tmp] As Integer = Integer.Parse(bid.Split("=")(1))
                HttpContext.Current.Session.Add("NOTADULT", [_tmp])
                Response.Redirect("[COM].ASPX")
            Catch ex As Exception
            End Try
        End If
        If global_asax.CheckTags2(bid, "ADULT") > 0 Then
            Try
                Dim [_tmp] As Integer = Integer.Parse(bid.Split("=")(1))
                HttpContext.Current.Session.Add("ADULT", [_tmp])
                Response.Redirect("[COM].ASPX")
            Catch ex As Exception
            End Try
        End If
        '        
        Try
            If bid.Split("?").Length > 1 Then
                If bid.Split("?")(1).Split("|").Length = 1 Then
                    '
                    Try
                        Dim [_tmp] As Integer = Integer.Parse(bid.Split("=")(1))
                        Sql = String.Concat("SELECT * FROM ALL_RSS WHERE ID=", [_tmp], "")
                        cmd = New OleDbCommand(Sql, global_asax.conn1)
                        HttpContext.Current.Session.Add("PID", [_tmp])
                        Return value
                    Catch ex As Exception
                    End Try
                    '
                    Try
                        Dim [_tmp] As Integer = Integer.Parse(bid.Split("?")(1))
                    Catch ex As Exception
                        Dim CAT As String = bid.Split("?")(1)
                        Select CAT
                            Case "ADULT"
                                Sql = String.Concat("SELECT * FROM ALL_RSS WHERE (RATE>", Integer.Parse(0), ") AND (ADL=True)")
                                cmd = New OleDbCommand(Sql, global_asax.conn1)
                            Case Else
                                Sql = String.Concat("SELECT * FROM ALL_RSS WHERE ((RATE>", Integer.Parse(0), ") AND (ADL=False) AND (TAGS Like '%", bid.Split("?")(1), "%'))")
                                cmd = New OleDbCommand(Sql, global_asax.conn1)
                        End Select
                        HttpContext.Current.Session.Add("CAT", bid.Split("?")(1))
                        Return value
                    End Try
                End If
            Else
                HttpContext.Current.Session("CAT") = Nothing    
            End If
        Catch ex As Exception
        End Try
        '------------
        '
        Try
            If bid.Split("?").Length > 1 Then
                HttpContext.Current.Session.Add("ROOT_HOST", bid.Split("?")(0))
                bid = bid.Split("?")(1)
                HttpContext.Current.Session.Add("VOTE_DIRECT", bid.Split("|")(2))
                HttpContext.Current.Session.Add("VOTE_OLD_VALUE", bid.Split("|")(1))
                value = Integer.Parse(bid.Split("|")(0))
            End If
        Catch ex As Exception
            If bid.Split("?").Length = 1 Then
                Try
                    HttpContext.Current.Session.Add("CUR_PAGE_ID", Integer.Parse(bid.Split("?")(0)))
                    If IsNothing(HttpContext.Current.Session("CAT"))
                        Sql = String.Concat("SELECT * FROM ALL_RSS WHERE ((RATE>", Integer.Parse(0), ") AND (ADL=False))")
                    Else
                        Sql = String.Concat("SELECT * FROM ALL_RSS WHERE ((RATE>", Integer.Parse(0), ") AND (ADL=False) AND (TAGS Like '%", HttpContext.Current.Session("CAT"), "%'))")
                    End If
                    cmd = New OleDbCommand(Sql, global_asax.conn1)
                Catch [ex2] As Exception
                    HttpContext.Current.Session.Add("CUR_PAGE_ID", 0)
                End Try
            End If
        End Try
        '
        Return value
        ''
    End Function
    
    Public Sub Inicialize()
        '
        If IsNothing(global_asax.conn1) Then
            global_asax.INITIALIZE(Server.MapPath("App_Data/icca.mde"))
            cmd = New OleDbCommand(Sql, global_asax.conn1)
            Try
                global_asax.conn1.Open()
                global_asax.ID_REUPDATE = Date.Now.ToOADate
            Catch ex As Exception
            End Try
            THUMBNAILS.BinaryAssembly.FILENAME = Server.MapPath("App_Data/THUMBNAILS.config")
            THUMBNAILS.BinaryAssembly.LOAD()
        End If
        '
        With da
            .SelectCommand = cmd
            .Fill(ds, "ALL_RSS")
        End With
        Table = ds.Tables(0)
        '------------------
        Dim foundRows() As DataRow _
             = Table.Select(Nothing, "RATE DESC")
        Dim ITemp As DataTable = Table.Copy()
        ITemp.Rows.Clear()
        For Each r As DataRow In foundRows
            ITemp.ImportRow(r)
        Next
        Table = ITemp
        '------------------
    End Sub
    
    Public CAT As Dictionary(Of String, String) _
            = New Dictionary(Of String, String)
    
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        '
        Dim PID As Integer = CheckBid()
        Dim ERR As String = Nothing
        If PID >= 0 Then
            Try
                If HttpContext.Current.Session("TEMP") = True Then
                    '
                    Dim [_VOTE_FLAG] As Boolean = True 
                    Dim SESSION_VOTES As Dictionary(Of Integer, Integer)
                    If IsNothing(HttpContext.Current.Session("SESSION_VOTES")) Then
                        SESSION_VOTES = New Dictionary(Of Integer, Integer)
                        SESSION_VOTES.Add(PID,PID) 
                        HttpContext.Current.Session.Add("SESSION_VOTES", SESSION_VOTES) 
                        [_VOTE_FLAG] = True
                    Else
                        SESSION_VOTES = HttpContext.Current.Session("SESSION_VOTES")  
                        If SESSION_VOTES.TryGetValue(PID , Nothing) Then
                            ERR=String.Concat("You can not vote twice for a single item!")
                            [_VOTE_FLAG] = False
                        Else
                            SESSION_VOTES.Add(PID,PID)
                            HttpContext.Current.Session.Add("SESSION_VOTES", SESSION_VOTES)
                            [_VOTE_FLAG] = True
                        End If
                    End If
                    '
                    If [_VOTE_FLAG] = True Then
                        Select Case HttpContext.Current.Session("VOTE_DIRECT").ToString.Trim
                            Case "+"
                                VOTE(PID, HttpContext.Current.Session("VOTE_OLD_VALUE") + 1)
                            Case "-"
                                VOTE(PID, HttpContext.Current.Session("VOTE_OLD_VALUE") - 1)
                        End Select
                    End If
                    '
                    If NOT IsNothing(ERR) Then
                        HttpContext.Current.Session.Add("ERROR", ERR)
                        Response.Redirect("ERRORS.ASPX")
                    End If        
        '           '
                    Response.Redirect(HttpContext.Current.Session("ROOT_HOST"))
                    '
                End If
            Catch ex As Exception
            End Try
        Else
            Try
                '
                Inicialize()
                '
                HttpContext.Current.Session.Add("TEMP", True)
                HttpContext.Current.Session.Add("ALL_BASE_ROWS", Table.Rows.Count )
                '
            Catch ex As Exception
            End Try
        End If
        '
        Try
            If HttpContext.Current.Session("PID") > 0 Then
                Page.Title = Table.Rows(0)("TITLE")
            End If
        Catch ex As Exception
        End Try
        '
    End Sub
    
    Protected Sub VOTE(ByVal ID As Integer, ByVal Value As Integer)
        Try
            Dim cmd2 As New OleDbCommand()
            cmd2.Connection = global_asax.conn1
            Dim query As String = String.Concat("UPDATE ALL_RSS SET RATE='", Value, "' WHERE ID=", Integer.Parse(ID), "")
            cmd2.CommandText = query
            cmd2.ExecuteNonQuery()
        Catch ex As Exception
        End Try
    End Sub
    
    Protected Sub btn_nav_1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_nav_1.Click
        Response.Redirect(String.Concat(HttpContext.Current.Session("ROOT_HOST"), "?", HttpContext.Current.Session("CUR_PAGE_ID") - 1))
    End Sub

    Protected Sub btn_nav_2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_nav_2.Click
        Response.Redirect(String.Concat(HttpContext.Current.Session("ROOT_HOST"), "?", HttpContext.Current.Session("CUR_PAGE_ID") + 1))
    End Sub
    
    Protected Sub page_nav_1(ByVal sender As Object, ByVal e As System.EventArgs)
        '
        '
    End Sub
    
    Structure _meta
        Dim _meta_title As String _
          , _meta_description As String _
          , _meta_keywords As String _
          , _meta_LI As String
    End Structure
    
    Function GET_PAGE_INFO(ByVal [_PAGE_PATH] As String) As _meta
        Dim ret As _meta = New _meta
        Try
            Dim [_XML_DATA] As String _
                    = global_asax.GetInfo([_PAGE_PATH]) _
              , [_NEW_XML_DATA] As String = Nothing

            [_XML_DATA] = [_XML_DATA].Replace(ControlChars.NewLine, "").Replace(ControlChars.CrLf, "") _
                                     .Replace("<!--", "").Replace("-->", "")
            Dim TAGS As Dictionary(Of String, Integer) _
                  = New Dictionary(Of String, Integer)
            Dim MC As System.Text.RegularExpressions.MatchCollection _
                    = New Regex(String.Concat("<", "(.*?)")).Matches([_XML_DATA])
            Dim ITab As Integer = 0
            Dim LI1 As Integer = 0
            Dim LI2 As Integer = 0
            For i As Integer = 0 To MC.Count - 1
                Dim T1 As Integer = 0 _
                  , T2 As Integer = 0
                Try
                    T1 = MC(i + 0).Index
                    T2 = MC(i + 1).Index
                Catch ex As Exception
                    T1 = MC(i + 0).Index
                    T2 = [_XML_DATA].Length
                End Try
                Dim substring As String = [_XML_DATA].Substring(T1, T2 - T1).ToLower.Replace(ControlChars.Tab, "") _
                                                                                    .Replace(ControlChars.NullChar, "") _
                                                                                    .Replace(ControlChars.CrLf, "") _
                                                                                    .Replace(ControlChars.Cr, "")
                If global_asax.CheckTags2(substring, "<title>") > 0 Then
                    ret._meta_title = substring.Replace("<title>", "")
                End If
                If global_asax.CheckTags2(substring, "description") > 0 Then
                    ret._meta_description = substring.Substring(global_asax.CheckTags(substring, "content=") + 9).Replace("""", "") _
                                                                                                                 .Replace("`", "") _
                                                                                                                 .Replace("/", "") _
                                                                                                                 .Replace(">", "") _ 
                                                                                                                 .Replace("'", "")
                End If
                If global_asax.CheckTags2(substring, "keywords") > 0 Then
                    ret._meta_keywords = substring.Substring(global_asax.CheckTags(substring, "content=") + 9).Replace("""", "") _
                                                                                                              .Replace("`", "") _
                                                                                                              .Replace("/", "") _
                                                                                                              .Replace(">", "") _ 
                                                                                                              .Replace("'", "")
                End If
               
            Next
        Catch ex As Exception
        End Try
        Return ret
    End Function
    
    Function BYTES_TO_STRING(ByVal T As String) As String
        Dim ret As String = Nothing
        '
        '
        Return ret
    End Function
    
    Sub CHECKING(ByRef row As DataRow)
        Dim [FLAG] As Boolean = True
        Try
            Dim [T] As String = row("TITLE")
            If Not [T].Length > 1 Then
                [FLAG] = False
            End If
        Catch [_ex1] As Exception
            [FLAG] = False
        End Try
        '
        If [FLAG] = False Then
            Try
                '
                Dim [PR] As Integer = 1 _
                  , [AL] As Integer = 0 _
                  , RVA As Integer = 1
                Dim _RND As Integer = 1
                Try
                    Microsoft.VisualBasic.Randomize() _ 
                        : Microsoft.VisualBasic.Randomize()
                    _RND = _RND + Math.Round((Microsoft.VisualBasic.Rnd(10) * 10), 0)
                Catch ex As Exception
                End Try
                Try
                    
                    [PR] = Integer.Parse(row("PR"))
                    [AL] = Integer.Parse(row("AL"))
                    If [AL] > 0 Then
                        Select Case [AL]
                            Case Is < 500
                                RVA = 9
                            Case Is < 1000
                                RVA = 8
                            Case Is < 5000
                                RVA = 7
                            Case Is < 10000
                                RVA = 6
                            Case Is < 50000
                                RVA = 5
                            Case Is < 100000
                                RVA = 4
                            Case Is < 200000
                                RVA = 3
                            Case Is < 500000
                                RVA = 2
                        End Select
                    End If
                Catch ex As Exception
                End Try
                RVA = RVA * [PR] / _RND
                If RVA = 0 Then
                    RVA = 1
                End If
                '         
                Dim ret As _meta = GET_PAGE_INFO(row("link"))
                Dim ID As Integer = row("ID")
                Dim cmd2 As New OleDbCommand()
                cmd2.Connection = global_asax.conn1
                Dim query As String = String.Concat("UPDATE ALL_RSS SET TITLE='", ret._meta_title, "', TAGS='", ret._meta_keywords, "', DESCRIPTION='", ret._meta_description, "', RATE='", RVA, "', LI='", ret._meta_LI, "' WHERE ID=", ID, "")
                cmd2.CommandText = query
                cmd2.ExecuteNonQuery()
                '
            Catch [_ex2] As Exception
            End Try
        End If
    End Sub
    
    Function GET_CATS(ByRef row As DataRow) As String
        Dim ret As String = Nothing
        Try
            Dim ID As Integer = 1
            For Each i As String In String.Concat(row("TAGS")).Split(",")
                If ID > 10 Then
                    Exit For
                End If
                i = i.ToUpper.Trim
                ret = String.Concat(ret, "<a href='?", i, "'><input id='Button' type='button' value='", i, "' style='border-style: double; font-size: 8px; background-color: #00FFFF;' /></a>", vbCrLf)
                ID += 1
            Next
        Catch ex As Exception
        End Try
        Return ret
    End Function
    
</script>

<%@ Page Title="4EK.ORG DIRECTORY PROJECT" Language="VB" MasterPageFile="~/Site.Master" AutoEventWireup="false"
    CodeFile="Default.aspx.vb" Inherits="_Default" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>

<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">

                            <%
                                Response.WriteFile(String.Concat(Server.MapPath("App_Data/TEMPLATES/TAGS.TXT")))
                            %>

              <asp:Panel ID="Panel1" runat="server" Height="580px" 
                  ScrollBars="Vertical" BorderStyle="Double" EnableTheming="True" 
                  HorizontalAlign="Left">

                  <%
                      Dim [_PID] As Integer _ 
                            = HttpContext.Current.Session("PID")
                      If [_PID] > 0 Then
                          '
                          %>

                                                    <%
                                                        Try
                                                            Dim ID As Integer = 0 
                                                            Dim Row As DataRow = Table.Rows(ID + 0)
                                                            CHECKING(Row)
                                                            %>
                                                            
                                                            <div style="width: 540px; height: 480px; overflow: hidden;">
                                                                <div id="TabbedPanels<%=ID+0 %>" class="TabbedPanels">
                                                                  <ul class="TabbedPanelsTabGroup">
                                                                    <li class="TabbedPanelsTab" tabindex="0">Thumbnail</li>
                                                                    <li class="TabbedPanelsTab" tabindex="0">Description</li>
                                                                  </ul>
                                                                  <div class="TabbedPanelsContentGroup">
                                                                    <div class="TabbedPanelsContent">

                                                                        <div style="width: 490px; height: 440px; overflow: hidden;">

                                                                                    <meter value="<%=Row("RATE")%>" min="0" max="20" low="65" high="96" optimum="100">B+</meter>
                                                                                    <a href='?<%=Row("id")%>|<%=Row("RATE")%>|+'>
                                                                                    <input id="Button1" type="button" value="+" style="width: 22px; height: 22px" />
                                                                                    </a>
                                                                                        <% 
                                                                                            Select Case Row("RATE")
                                                                                                Case Is > 8
                                                                                                    %>
                                                                                                    <input id="Button42" type="button" value="<%=Row("RATE")%>" 
                                                                                                        style="border-style: solid; width: 26px; height: 22px; background-color: #00FF00;" />
                                                                                                    <%
                                                                                                Case Is > 4
                                                                                                    %>
                                                                                                    <input id="Button41" type="button" value="<%=Row("RATE")%>" 
                                                                                                        style="border-style: solid; width: 26px; height: 22px; background-color: #3399FF;" />
                                                                                                    <%
                                                                                                Case Is > -1
                                                                                                    %>
                                                                                                    <input id="Button41" type="button" value="<%=Row("RATE")%>" 
                                                                                                        style="border-style: solid; width: 26px; height: 22px; background-color: #FFFFFF;" />
                                                                                                    <%
                                                                                                Case Else
                                                                                                    %>
                                                                                                    <input id="Button41" type="button" value="<%=Row("RATE")%>" 
                                                                                                        style="border-style: solid; width: 26px; height: 22px; background-color: #FF9933;" />
                                                                                                    <%
                                                                                                End Select
                                                                                        %>
                                                                                    <a href='?<%=Row("id")%>|<%=Row("RATE")%>|-'>
                                                                                    <input id="Button3" type="button" value="-" style="width: 22px; height: 22px" />
                                                                                    </a>
                                                                                    &nbsp;&nbsp;<a title="<%=Row("TITLE")%>" href="<%=Row("link")%>">Link</a>
                                                                                    &nbsp;&nbsp;
                                                                                    <a href='?spam=<%=Row("id")%>'>
                                                                                    <input id="Button" type="button" value="spam?" style="background-color: #FF6666" />
                                                                                    </a>
                                                                                    <%
                                                                                        If Row("ADL")=True 
                                                                                            %>
                                                                                            <a href='?NOTADULT=<%=Row("id")%>'>
                                                                                            <input id="Button61" type="button" value="NO xxx?" style="background-color: #9999FF" />
                                                                                            </a>
                                                                                            <%
                                                                                        Else
                                                                                            %>
                                                                                            <a href='?ADULT=<%=Row("id")%>'>
                                                                                            <input id="Button62" type="button" value="xxx?" style="background-color: #9999FF" />
                                                                                            </a>
                                                                                            <%
                                                                                        End If
                                                                                    %>
                                                                                    <p>
                                                                                    <h2><%=Table.Rows(ID + 0)("link")%></h2>

                                                                            <table style="width: 100%">
	                                                                            <tr><td>
                                                                                    <div id="div111" class="TabbedPanelsContent">
                                                                                        <img alt="" width="440" height="300" src="THUMBS.ASPX?var=<%=Row("link")%>" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; " />
                                                                                    </div>
	                                                                            </td><td>

	                                                                            </td></tr>
                                                                            </table>

                                                                            <%=GET_CATS(Row) %>

                                                                        </div>

                                                                    </div>
                                                                    <div class="TabbedPanelsContent">
                                                                                        <div style="width: 530px; height: 440px; overflow: scroll;" type="text/html">
                                                                                            <% 
                                                                                                Dim _T1 As String = Nothing _
                                                                                                  , _T2 As String = Nothing _
                                                                                                  , _T3 As String = Nothing _
                                                                                                  , _T4 As String = Nothing
                                                                                                Try
                                                                                                    _T1 = Row("TITLE")
                                                                                                    _T2 = Row("DESCRIPTION")
                                                                                                    _T3 = Row("TAGS")
                                                                                                    _T4 = BYTES_TO_STRING(Row("LI"))
                                                                                                Catch ex As Exception
                                                                                                End Try
                                                                                            %>
                                                                                            <h3><%=_T1%></h3>
                                                                                            <p style="font-size: xx-small; font-family: 'Niagara Engraved';"><%=_T2%></p>
                                                                                            <p style="font-size: xx-small; font-family: 'Niagara Engraved';"><%=_T3%></p>
                                                                                            <p style="font-size: xx-small; font-family: 'Niagara Engraved';"><%=_T4%></p>
                                                                                            <a title="<%=Row("TITLE")%>" href="<%=Row("link")%>">Site link</a>
                                                                                        </div>
                                                                    </div>
                                                                  </div>
                                                                </div>
                                                                <script type="text/javascript">
                                                                    var TabbedPanels<%=ID+0 %> = new Spry.Widget.TabbedPanels("TabbedPanels<%=ID+0 %>");
                                                                </script>                                            
                                                            </div>

                                                            <%
                                                        Catch ex As Exception
                                                        End Try
                                                    %>
                          
                          <%
                          '
                          HttpContext.Current.Session("PID") = 0
                      Else
                          '
                          %>

                    <% 
                        Dim CUR_PAGE_ID As Integer = 0 _
                          , IIID As Integer = 0
                        Dim [OFs] As Integer _
                                            = Math.Max(HttpContext.Current.Session("CUR_PAGE_ID") - 1, 0) * 9
                                    For ID As Integer = 0 + [OFs] To Table.Rows.Count - 1
                            'Dim row As DataRow = Table.Rows(ID)
                                            
                                        If IIID < 9 Then
                                                
                                        %>

                                            <table style="width: 100%">
	                                            <tr><td>

                                                    <%
                                                        Try
                                                            Dim Row As DataRow = Table.Rows(ID + 0)
                                                            CHECKING(Row)
                                                            %>
                                                            
                                                            <div style="width: 340px; height: 300px; overflow: hidden;">
                                                                <div id="TabbedPanels<%=ID+0 %>" class="TabbedPanels">
                                                                  <ul class="TabbedPanelsTabGroup">
                                                                    <li class="TabbedPanelsTab" tabindex="0">Thumbnail</li>
                                                                    <li class="TabbedPanelsTab" tabindex="0">Description</li>
                                                                  </ul>
                                                                  <div class="TabbedPanelsContentGroup">
                                                                    <div class="TabbedPanelsContent">

                                                                                    <meter value="<%=Row("RATE")%>" min="0" max="20" low="65" high="96" optimum="100">B+</meter>
                                                                                    <a href='?<%=Row("id")%>|<%=Row("RATE")%>|+'>
                                                                                    <input id="Button1" type="button" value="+" style="width: 22px; height: 22px" />
                                                                                    </a>
                                                                                        <% 
                                                                                            Select Case Table.Rows(ID + 0)("RATE")
                                                                                                Case Is > 8
                                                                                                    %>
                                                                                                    <input id="Button42" type="button" value="<%=Row("RATE")%>" 
                                                                                                        style="border-style: solid; width: 26px; height: 22px; background-color: #00FF00;" />
                                                                                                    <%
                                                                                                Case Is > 4
                                                                                                    %>
                                                                                                    <input id="Button41" type="button" value="<%=Row("RATE")%>" 
                                                                                                        style="border-style: solid; width: 26px; height: 22px; background-color: #3399FF;" />
                                                                                                    <%
                                                                                                Case Is > -1
                                                                                                    %>
                                                                                                    <input id="Button41" type="button" value="<%=Row("RATE")%>" 
                                                                                                        style="border-style: solid; width: 26px; height: 22px; background-color: #FFFFFF;" />
                                                                                                    <%
                                                                                                Case Else
                                                                                                    %>
                                                                                                    <input id="Button41" type="button" value="<%=Row("RATE")%>" 
                                                                                                        style="border-style: solid; width: 26px; height: 22px; background-color: #FF9933;" />
                                                                                                    <%
                                                                                                End Select
                                                                                        %>
                                                                                    <a href='?<%=Row("id")%>|<%=Row("RATE")%>|-'>
                                                                                    <input id="Button3" type="button" value="-" style="width: 22px; height: 22px" />
                                                                                    </a>
                                                                                    &nbsp;&nbsp;<a title="<%=Row("TITLE")%>" href="<%=Row("link")%>">Link</a>
                                                                                    &nbsp;&nbsp;
                                                                                    <a href='?spam=<%=Row("id")%>'>
                                                                                    <input id="Button" type="button" value="spam?" style="background-color: #FF6666" />
                                                                                    </a>
                                                                                    <%
                                                                                        If Row("ADL")=True 
                                                                                            %>
                                                                                            <a href='?NOTADULT=<%=Row("id")%>'>
                                                                                            <input id="Button43" type="button" value="NO xxx?" style="background-color: #9999FF" />
                                                                                            </a>
                                                                                            <%
                                                                                        Else
                                                                                            %>
                                                                                            <a href='?ADULT=<%=Row("id")%>'>
                                                                                            <input id="Button44" type="button" value="xxx?" style="background-color: #9999FF" />
                                                                                            </a>
                                                                                            <%
                                                                                        End If
                                                                                    %>
                                                                                    <p>
                                                                        <table style="width: 100%">
	                                                                        <tr><td>
                                                                                <div id="div111" class="TabbedPanelsContent">
                                                                                    <img alt="" width="210" height="190" src="THUMBS.ASPX?var=<%=Row("link")%>" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; " />
                                                                                    <%=String.Concat("<br />",Row("link")).Replace("http://", "").Replace("https://", "")%>
                                                                                </div>
	                                                                        </td><td>
                                                                                    <%=GET_CATS(Row) %>
	                                                                        </td></tr>
                                                                        </table>
                                                                        

                                                                    </div>
                                                                    <div class="TabbedPanelsContent">
                                                                                        <div style="width: 360px; height: 280px; overflow: scroll;" type="text/html">
                                                                                            <% 
                                                                                                Dim _T1 As String = Nothing _
                                                                                                  , _T2 As String = Nothing _
                                                                                                  , _T3 As String = Nothing _
                                                                                                  , _T4 As String = Nothing
                                                                                                Try
                                                                                                    _T1 = Row("TITLE")
                                                                                                    _T2 = Row("DESCRIPTION")
                                                                                                    _T3 = Row("TAGS")
                                                                                                    _T4 = BYTES_TO_STRING(Row("LI"))
                                                                                                Catch ex As Exception
                                                                                                End Try
                                                                                            %>
                                                                                            <h3><%=_T1%></h3>
                                                                                            <p style="font-size: xx-small; font-family: 'Niagara Engraved';"><%=_T2%></p>
                                                                                            <p style="font-size: xx-small; font-family: 'Niagara Engraved';"><%=_T3%></p>
                                                                                            <p style="font-size: xx-small; font-family: 'Niagara Engraved';"><%=_T4%></p>
                                                                                            <a title="<%=Row("TITLE")%> in directory entry" href="?ID=<%=Row("id")%>">Link in directory entry</a><br />
                                                                                            <a title="<%=Row("TITLE")%>" href="<%=Row("link")%>">Site link</a>
                                                                                        </div>
                                                                    </div>
                                                                  </div>
                                                                </div>
                                                                <script type="text/javascript">
                                                                    var TabbedPanels<%=ID+0 %> = new Spry.Widget.TabbedPanels("TabbedPanels<%=ID+0 %>");
                                                                </script>                                            
                                                            </div>

                                                            <%
                                                        Catch ex As Exception
                                                        End Try
                                                    %>

                                                </td><td>
                                                    
                                                    <%
                                                        Try
                                                            Dim Row As DataRow = Table.Rows(ID + 1)
                                                            CHECKING(Row)
                                                            %>
                                                            
                                                            <div style="width: 340px; height: 300px; overflow: hidden;">
                                                                <div id="TabbedPanels<%=ID+1 %>" class="TabbedPanels">
                                                                  <ul class="TabbedPanelsTabGroup">
                                                                    <li class="TabbedPanelsTab" tabindex="0">Thumbnail</li>
                                                                    <li class="TabbedPanelsTab" tabindex="0">Description</li>
                                                                  </ul>
                                                                  <div class="TabbedPanelsContentGroup">
                                                                    <div class="TabbedPanelsContent">

                                                                                    <meter value="<%=Row("RATE")%>" min="0" max="20" low="65" high="96" optimum="100">B+</meter>
                                                                                    <a href='?<%=Row("id")%>|<%=Row("RATE")%>|+'>
                                                                                    <input id="Button1" type="button" value="+" style="width: 22px; height: 22px" />
                                                                                    </a>
                                                                                        <% 
                                                                                            Select Case Row("RATE")
                                                                                                Case Is > 8
                                                                                                    %>
                                                                                                    <input id="Button42" type="button" value="<%=Row("RATE")%>" 
                                                                                                        style="border-style: solid; width: 26px; height: 22px; background-color: #00FF00;" />
                                                                                                    <%
                                                                                                Case Is > 4
                                                                                                    %>
                                                                                                    <input id="Button41" type="button" value="<%=Row("RATE")%>" 
                                                                                                        style="border-style: solid; width: 26px; height: 22px; background-color: #3399FF;" />
                                                                                                    <%
                                                                                                Case Is > -1
                                                                                                    %>
                                                                                                    <input id="Button41" type="button" value="<%=Row("RATE")%>" 
                                                                                                        style="border-style: solid; width: 26px; height: 22px; background-color: #FFFFFF;" />
                                                                                                    <%
                                                                                                Case Else
                                                                                                    %>
                                                                                                    <input id="Button41" type="button" value="<%=Row("RATE")%>" 
                                                                                                        style="border-style: solid; width: 26px; height: 22px; background-color: #FF9933;" />
                                                                                                    <%
                                                                                                End Select
                                                                                        %>
                                                                                    <a href='?<%=Row("id")%>|<%=Row("RATE")%>|-'>
                                                                                    <input id="Button3" type="button" value="-" style="width: 22px; height: 22px" />
                                                                                    </a>
                                                                                    &nbsp;&nbsp;<a title="<%=Row("TITLE")%>" href="<%=Row("link")%>">Link</a>
                                                                                    &nbsp;&nbsp;
                                                                                    <a href='?spam=<%=Row("id")%>'>
                                                                                    <input id="Button" type="button" value="spam?" style="background-color: #FF6666" />
                                                                                    </a>
                                                                                    <%
                                                                                        If Row("ADL")=True 
                                                                                            %>
                                                                                            <a href='?NOTADULT=<%=Row("id")%>'>
                                                                                            <input id="Button45" type="button" value="NO xxx?" style="background-color: #9999FF" />
                                                                                            </a>
                                                                                            <%
                                                                                        Else
                                                                                            %>
                                                                                            <a href='?ADULT=<%=Row("id")%>'>
                                                                                            <input id="Button46" type="button" value="xxx?" style="background-color: #9999FF" />
                                                                                            </a>
                                                                                            <%
                                                                                        End If
                                                                                    %>
                                                                                    <p>

                                                                        <table style="width: 100%">
	                                                                        <tr><td>
                                                                                <div id="div111" class="TabbedPanelsContent">
                                                                                    <img alt="" width="210" height="190" src="THUMBS.ASPX?var=<%=Row("link")%>" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; " />
                                                                                    <%=String.Concat("<br />",Row("link")).Replace("http://", "").Replace("https://", "")%>
                                                                                </div>
	                                                                        </td><td>
                                                                                    <%=GET_CATS(Row)%>
	                                                                        </td></tr>
                                                                        </table>
                                                                    </div>
                                                                    <div class="TabbedPanelsContent">
                                                                                        <div style="width: 360px; height: 280px; overflow: scroll;" type="text/html">
                                                                                            <% 
                                                                                                Dim _T1 As String = Nothing _
                                                                                                  , _T2 As String = Nothing _
                                                                                                  , _T3 As String = Nothing _
                                                                                                  , _T4 As String = Nothing
                                                                                                Try
                                                                                                    _T1 = Row("TITLE")
                                                                                                    _T2 = Row("DESCRIPTION")
                                                                                                    _T3 = Row("TAGS")
                                                                                                    _T4 = BYTES_TO_STRING(Row("LI"))
                                                                                                Catch ex As Exception
                                                                                                End Try
                                                                                            %>
                                                                                            <h3><%=_T1%></h3>
                                                                                            <p style="font-size: xx-small; font-family: 'Niagara Engraved';"><%=_T2%></p>
                                                                                            <p style="font-size: xx-small; font-family: 'Niagara Engraved';"><%=_T3%></p>
                                                                                            <p style="font-size: xx-small; font-family: 'Niagara Engraved';"><%=_T4%></p>
                                                                                            <a title="<%=Row("TITLE")%> in directory entry" href="?ID=<%=Row("id")%>">Link in directory entry</a><br />
                                                                                            <a title="<%=Row("TITLE")%>" href="<%=Row("link")%>">Site link</a>
                                                                                        </div>
                                                                    </div>
                                                                  </div>
                                                                </div>
                                                                <script type="text/javascript">
                                                                    var TabbedPanels<%=ID+1 %> = new Spry.Widget.TabbedPanels("TabbedPanels<%=ID+1 %>");
                                                                </script>                                            
                                                            </div>

                                                            <%
                                                        Catch ex As Exception
                                                        End Try
                                                    %>

                                                </td><td>

                                                    <%
                                                        Try
                                                            Dim Row As DataRow = Table.Rows(ID + 2)
                                                            CHECKING(Row)
                                                            %>
                                                            
                                                            <div style="width: 340px; height: 300px; overflow: hidden;">
                                                                <div id="TabbedPanels<%=ID+2 %>" class="TabbedPanels">
                                                                  <ul class="TabbedPanelsTabGroup">
                                                                    <li class="TabbedPanelsTab" tabindex="0">Thumbnail</li>
                                                                    <li class="TabbedPanelsTab" tabindex="0">Description</li>
                                                                  </ul>
                                                                  <div class="TabbedPanelsContentGroup">
                                                                    <div class="TabbedPanelsContent">

                                                                                    <meter value="<%=Row("RATE")%>" min="0" max="20" low="65" high="96" optimum="100">B+</meter>
                                                                                    <a href='?<%=Row("id")%>|<%=Row("RATE")%>|+'>
                                                                                    <input id="Button1" type="button" value="+" style="width: 22px; height: 22px" />
                                                                                    </a>
                                                                                        <% 
                                                                                            Select Case Row("RATE")
                                                                                                Case Is > 8
                                                                                                    %>
                                                                                                    <input id="Button42" type="button" value="<%=Row("RATE")%>" 
                                                                                                        style="border-style: solid; width: 26px; height: 22px; background-color: #00FF00;" />
                                                                                                    <%
                                                                                                Case Is > 4
                                                                                                    %>
                                                                                                    <input id="Button41" type="button" value="<%=Row("RATE")%>" 
                                                                                                        style="border-style: solid; width: 26px; height: 22px; background-color: #3399FF;" />
                                                                                                    <%
                                                                                                Case Is > -1
                                                                                                    %>
                                                                                                    <input id="Button41" type="button" value="<%=Row("RATE")%>" 
                                                                                                        style="border-style: solid; width: 26px; height: 22px; background-color: #FFFFFF;" />
                                                                                                    <%
                                                                                                Case Else
                                                                                                    %>
                                                                                                    <input id="Button41" type="button" value="<%=Row("RATE")%>" 
                                                                                                        style="border-style: solid; width: 26px; height: 22px; background-color: #FF9933;" />
                                                                                                    <%
                                                                                                End Select
                                                                                        %>
                                                                                    <a href='?<%=Row("id")%>|<%=Row("RATE")%>|-'>
                                                                                    <input id="Button3" type="button" value="-" style="width: 22px; height: 22px" />
                                                                                    </a>
                                                                                    &nbsp;&nbsp;<a title="<%=Row("TITLE")%>" href="<%=Row("link")%>">Link</a>
                                                                                    &nbsp;&nbsp;
                                                                                    <a href='?spam=<%=Row("id")%>'>
                                                                                    <input id="Button" type="button" value="spam?" style="background-color: #FF6666" />
                                                                                    </a>
                                                                                    <%
                                                                                        If Row("ADL")=True 
                                                                                            %>
                                                                                            <a href='?NOTADULT=<%=Row("id")%>'>
                                                                                            <input id="Button47" type="button" value="NO xxx?" style="background-color: #9999FF" />
                                                                                            </a>
                                                                                            <%
                                                                                        Else
                                                                                            %>
                                                                                            <a href='?ADULT=<%=Row("id")%>'>
                                                                                            <input id="Button48" type="button" value="xxx?" style="background-color: #9999FF" />
                                                                                            </a>
                                                                                            <%
                                                                                        End If
                                                                                    %>
                                                                                    <p>

                                                                        <table style="width: 100%">
	                                                                        <tr><td>
                                                                                <div id="div111" class="TabbedPanelsContent">
                                                                                    <img alt="" width="210" height="190" src="THUMBS.ASPX?var=<%=Row("link")%>" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; " />
                                                                                    <%=String.Concat("<br />",Row("link")).Replace("http://", "").Replace("https://", "")%>
	                                                                            </div>
                                                                            </td><td>
                                                                                    <%=GET_CATS(Row)%>
	                                                                        </td></tr>
                                                                        </table>
                                                                    </div>
                                                                    <div class="TabbedPanelsContent">
                                                                                        <div style="width: 360px; height: 280px; overflow: scroll;" type="text/html">
                                                                                            <% 
                                                                                                Dim _T1 As String = Nothing _
                                                                                                  , _T2 As String = Nothing _
                                                                                                  , _T3 As String = Nothing _
                                                                                                  , _T4 As String = Nothing
                                                                                                Try
                                                                                                    _T1 = Row("TITLE")
                                                                                                    _T2 = Row("DESCRIPTION")
                                                                                                    _T3 = Row("TAGS")
                                                                                                    _T4 = BYTES_TO_STRING(Row("LI"))
                                                                                                Catch ex As Exception
                                                                                                End Try
                                                                                            %>
                                                                                            <h3><%=_T1%></h3>
                                                                                            <p style="font-size: xx-small; font-family: 'Niagara Engraved';"><%=_T2%></p>
                                                                                            <p style="font-size: xx-small; font-family: 'Niagara Engraved';"><%=_T3%></p>
                                                                                            <p style="font-size: xx-small; font-family: 'Niagara Engraved';"><%=_T4%></p>
                                                                                            <a title="<%=Row("TITLE")%> in directory entry" href="?ID=<%=Row("id")%>">Link in directory entry</a><br />
                                                                                            <a title="<%=Row("TITLE")%>" href="<%=Row("link")%>">Site link</a>
                                                                                        </div>
                                                                    </div>
                                                                  </div>
                                                                </div>
                                                                <script type="text/javascript">
                                                                    var TabbedPanels<%=ID+2 %> = new Spry.Widget.TabbedPanels("TabbedPanels<%=ID+2 %>");
                                                                </script>                                            
                                                            </div>

                                                            <%
                                                        Catch ex As Exception
                                                        End Try
                                                    %>

                                                </td></tr><tr><td>

                                                    <%
                                                        Try
                                                            Dim Row As DataRow = Table.Rows(ID + 3)
                                                            CHECKING(Row)
                                                            %>
                                                            
                                                            <div style="width: 340px; height: 300px; overflow: hidden;">
                                                                <div id="TabbedPanels<%=ID+3 %>" class="TabbedPanels">
                                                                  <ul class="TabbedPanelsTabGroup">
                                                                    <li class="TabbedPanelsTab" tabindex="0">Thumbnail</li>
                                                                    <li class="TabbedPanelsTab" tabindex="0">Description</li>
                                                                  </ul>
                                                                  <div class="TabbedPanelsContentGroup">
                                                                    <div class="TabbedPanelsContent">

                                                                                    <meter value="<%=Row("RATE")%>" min="0" max="20" low="65" high="96" optimum="100">B+</meter>
                                                                                    <a href='?<%=Row("id")%>|<%=Row("RATE")%>|+'>
                                                                                    <input id="Button1" type="button" value="+" style="width: 22px; height: 22px" />
                                                                                    </a>
                                                                                        <% 
                                                                                            Select Case Row("RATE")
                                                                                                Case Is > 8
                                                                                                    %>
                                                                                                    <input id="Button42" type="button" value="<%=Row("RATE")%>" 
                                                                                                        style="border-style: solid; width: 26px; height: 22px; background-color: #00FF00;" />
                                                                                                    <%
                                                                                                Case Is > 4
                                                                                                    %>
                                                                                                    <input id="Button41" type="button" value="<%=Row("RATE")%>" 
                                                                                                        style="border-style: solid; width: 26px; height: 22px; background-color: #3399FF;" />
                                                                                                    <%
                                                                                                Case Is > -1
                                                                                                    %>
                                                                                                    <input id="Button41" type="button" value="<%=Row("RATE")%>" 
                                                                                                        style="border-style: solid; width: 26px; height: 22px; background-color: #FFFFFF;" />
                                                                                                    <%
                                                                                                Case Else
                                                                                                    %>
                                                                                                    <input id="Button41" type="button" value="<%=Row("RATE")%>" 
                                                                                                        style="border-style: solid; width: 26px; height: 22px; background-color: #FF9933;" />
                                                                                                    <%
                                                                                                End Select
                                                                                        %>
                                                                                    <a href='?<%=Row("id")%>|<%=Row("RATE")%>|-'>
                                                                                    <input id="Button3" type="button" value="-" style="width: 22px; height: 22px" />
                                                                                    </a>
                                                                                    &nbsp;&nbsp;<a title="<%=Row("TITLE")%>" href="<%=Row("link")%>">Link</a>
                                                                                    &nbsp;&nbsp;
                                                                                    <a href='?spam=<%=Row("id")%>'>
                                                                                    <input id="Button" type="button" value="spam?" style="background-color: #FF6666" />
                                                                                    </a>
                                                                                    <%
                                                                                        If Row("ADL")=True 
                                                                                            %>
                                                                                            <a href='?NOTADULT=<%=Row("id")%>'>
                                                                                            <input id="Button49" type="button" value="NO xxx?" style="background-color: #9999FF" />
                                                                                            </a>
                                                                                            <%
                                                                                        Else
                                                                                            %>
                                                                                            <a href='?ADULT=<%=Row("id")%>'>
                                                                                            <input id="Button50" type="button" value="xxx?" style="background-color: #9999FF" />
                                                                                            </a>
                                                                                            <%
                                                                                        End If
                                                                                    %>
                                                                                    <p>

                                                                        <table style="width: 100%">
	                                                                        <tr><td>
                                                                                <div id="div111" class="TabbedPanelsContent">
                                                                                    <img alt="" width="210" height="190" src="THUMBS.ASPX?var=<%=Row("link")%>" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; " />
                                                                                    <%=String.Concat("<br />",Row("link")).Replace("http://", "").Replace("https://", "")%>
	                                                                            </div>
                                                                            </td><td>
                                                                                    <%=GET_CATS(Row)%>
	                                                                        </td></tr>
                                                                        </table>
                                                                    </div>
                                                                    <div class="TabbedPanelsContent">
                                                                                        <div style="width: 360px; height: 280px; overflow: scroll;" type="text/html">
                                                                                            <% 
                                                                                                Dim _T1 As String = Nothing _
                                                                                                  , _T2 As String = Nothing _
                                                                                                  , _T3 As String = Nothing _
                                                                                                  , _T4 As String = Nothing
                                                                                                Try
                                                                                                    _T1 = Row("TITLE")
                                                                                                    _T2 = Row("DESCRIPTION")
                                                                                                    _T3 = Row("TAGS")
                                                                                                    _T4 = BYTES_TO_STRING(Row("LI"))
                                                                                                Catch ex As Exception
                                                                                                End Try
                                                                                            %>
                                                                                            <h3><%=_T1%></h3>
                                                                                            <p style="font-size: xx-small; font-family: 'Niagara Engraved';"><%=_T2%></p>
                                                                                            <p style="font-size: xx-small; font-family: 'Niagara Engraved';"><%=_T3%></p>
                                                                                            <p style="font-size: xx-small; font-family: 'Niagara Engraved';"><%=_T4%></p>
                                                                                            <a title="<%=Row("TITLE")%> in directory entry" href="?ID=<%=Row("id")%>">Link in directory entry</a><br />
                                                                                            <a title="<%=Row("TITLE")%>" href="<%=Row("link")%>">Site link</a>
                                                                                        </div>
                                                                    </div>
                                                                  </div>
                                                                </div>
                                                                <script type="text/javascript">
                                                                    var TabbedPanels<%=ID+3 %> = new Spry.Widget.TabbedPanels("TabbedPanels<%=ID+3 %>");
                                                                </script>                                            
                                                            </div>

                                                            <%
                                                        Catch ex As Exception
                                                        End Try
                                                    %>

                                                </td><td>

                                                    <%
                                                        Try
                                                            Dim Row As DataRow = Table.Rows(ID + 4)
                                                            CHECKING(Row)
                                                            %>
                                                            
                                                            <div style="width: 340px; height: 300px; overflow: hidden;">
                                                                <div id="TabbedPanels<%=ID+4 %>" class="TabbedPanels">
                                                                  <ul class="TabbedPanelsTabGroup">
                                                                    <li class="TabbedPanelsTab" tabindex="0">Thumbnail</li>
                                                                    <li class="TabbedPanelsTab" tabindex="0">Description</li>
                                                                  </ul>
                                                                  <div class="TabbedPanelsContentGroup">
                                                                    <div class="TabbedPanelsContent">

                                                                                    <meter value="<%=Row("RATE")%>" min="0" max="20" low="65" high="96" optimum="100">B+</meter>
                                                                                    <a href='?<%=Row("id")%>|<%=Row("RATE")%>|+'>
                                                                                    <input id="Button1" type="button" value="+" style="width: 22px; height: 22px" />
                                                                                    </a>
                                                                                        <% 
                                                                                            Select Case Row("RATE")
                                                                                                Case Is > 8
                                                                                                    %>
                                                                                                    <input id="Button42" type="button" value="<%=Row("RATE")%>" 
                                                                                                        style="border-style: solid; width: 26px; height: 22px; background-color: #00FF00;" />
                                                                                                    <%
                                                                                                Case Is > 4
                                                                                                    %>
                                                                                                    <input id="Button41" type="button" value="<%=Row("RATE")%>" 
                                                                                                        style="border-style: solid; width: 26px; height: 22px; background-color: #3399FF;" />
                                                                                                    <%
                                                                                                Case Is > -1
                                                                                                    %>
                                                                                                    <input id="Button41" type="button" value="<%=Row("RATE")%>" 
                                                                                                        style="border-style: solid; width: 26px; height: 22px; background-color: #FFFFFF;" />
                                                                                                    <%
                                                                                                Case Else
                                                                                                    %>
                                                                                                    <input id="Button41" type="button" value="<%=Row("RATE")%>" 
                                                                                                        style="border-style: solid; width: 26px; height: 22px; background-color: #FF9933;" />
                                                                                                    <%
                                                                                                End Select
                                                                                        %>
                                                                                    <a href='?<%=Row("id")%>|<%=Row("RATE")%>|-'>
                                                                                    <input id="Button3" type="button" value="-" style="width: 22px; height: 22px" />
                                                                                    </a>
                                                                                    &nbsp;&nbsp;<a title="<%=Row("TITLE")%>" href="<%=Row("link")%>">Link</a>
                                                                                    &nbsp;&nbsp;
                                                                                    <a href='?spam=<%=Row("id")%>'>
                                                                                    <input id="Button" type="button" value="spam?" style="background-color: #FF6666" />
                                                                                    </a>
                                                                                    <%
                                                                                        If Row("ADL")=True 
                                                                                            %>
                                                                                            <a href='?NOTADULT=<%=Row("id")%>'>
                                                                                            <input id="Button51" type="button" value="NO xxx?" style="background-color: #9999FF" />
                                                                                            </a>
                                                                                            <%
                                                                                        Else
                                                                                            %>
                                                                                            <a href='?ADULT=<%=Row("id")%>'>
                                                                                            <input id="Button52" type="button" value="xxx?" style="background-color: #9999FF" />
                                                                                            </a>
                                                                                            <%
                                                                                        End If
                                                                                    %>
                                                                                    <p>

                                                                        <table style="width: 100%">
	                                                                        <tr><td>
                                                                                <div id="div111" class="TabbedPanelsContent">
                                                                                    <img alt="" width="210" height="190" src="THUMBS.ASPX?var=<%=Row("link")%>" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; " />
                                                                                    <%=String.Concat("<br />",Row("link")).Replace("http://", "").Replace("https://", "")%>
	                                                                            </div>
                                                                            </td><td>
                                                                                    <%=GET_CATS(Row)%>
	                                                                        </td></tr>
                                                                        </table>
                                                                    </div>
                                                                    <div class="TabbedPanelsContent">
                                                                                        <div style="width: 360px; height: 280px; overflow: scroll;" type="text/html">
                                                                                            <% 
                                                                                                Dim _T1 As String = Nothing _
                                                                                                  , _T2 As String = Nothing _
                                                                                                  , _T3 As String = Nothing _
                                                                                                  , _T4 As String = Nothing
                                                                                                Try
                                                                                                    _T1 = Row("TITLE")
                                                                                                    _T2 = Row("DESCRIPTION")
                                                                                                    _T3 = Row("TAGS")
                                                                                                    _T4 = BYTES_TO_STRING(Row("LI"))
                                                                                                Catch ex As Exception
                                                                                                End Try
                                                                                            %>
                                                                                            <h3><%=_T1%></h3>
                                                                                            <p style="font-size: xx-small; font-family: 'Niagara Engraved';"><%=_T2%></p>
                                                                                            <p style="font-size: xx-small; font-family: 'Niagara Engraved';"><%=_T3%></p>
                                                                                            <p style="font-size: xx-small; font-family: 'Niagara Engraved';"><%=_T4%></p>
                                                                                            <a title="<%=Row("TITLE")%> in directory entry" href="?ID=<%=Row("id")%>">Link in directory entry</a><br />
                                                                                            <a title="<%=Row("TITLE")%>" href="<%=Row("link")%>">Site link</a>
                                                                                        </div>
                                                                    </div>
                                                                  </div>
                                                                </div>
                                                                <script type="text/javascript">
                                                                    var TabbedPanels<%=ID+4 %> = new Spry.Widget.TabbedPanels("TabbedPanels<%=ID+4 %>");
                                                                </script>                                            
                                                            </div>

                                                            <%
                                                        Catch ex As Exception
                                                        End Try
                                                    %>

                                                </td><td>

                                                    <%
                                                        Try
                                                            Dim Row As DataRow = Table.Rows(ID + 5)
                                                            CHECKING(Row)
                                                            %>
                                                            
                                                            <div style="width: 340px; height: 300px; overflow: hidden;">
                                                                <div id="TabbedPanels<%=ID+5 %>" class="TabbedPanels">
                                                                  <ul class="TabbedPanelsTabGroup">
                                                                    <li class="TabbedPanelsTab" tabindex="0">Thumbnail</li>
                                                                    <li class="TabbedPanelsTab" tabindex="0">Description</li>
                                                                  </ul>
                                                                  <div class="TabbedPanelsContentGroup">
                                                                    <div class="TabbedPanelsContent">

                                                                                    <meter value="<%=Row("RATE")%>" min="0" max="20" low="65" high="96" optimum="100">B+</meter>
                                                                                    <a href='?<%=Table.Rows(ID+5)("id")%>|<%=Row("RATE")%>|+'>
                                                                                    <input id="Button1" type="button" value="+" style="width: 22px; height: 22px" />
                                                                                    </a>
                                                                                        <% 
                                                                                            Select Case Row("RATE")
                                                                                                Case Is > 8
                                                                                                    %>
                                                                                                    <input id="Button42" type="button" value="<%=Row("RATE")%>" 
                                                                                                        style="border-style: solid; width: 26px; height: 22px; background-color: #00FF00;" />
                                                                                                    <%
                                                                                                Case Is > 4
                                                                                                    %>
                                                                                                    <input id="Button41" type="button" value="<%=Row("RATE")%>" 
                                                                                                        style="border-style: solid; width: 26px; height: 22px; background-color: #3399FF;" />
                                                                                                    <%
                                                                                                Case Is > -1
                                                                                                    %>
                                                                                                    <input id="Button41" type="button" value="<%=Row("RATE")%>" 
                                                                                                        style="border-style: solid; width: 26px; height: 22px; background-color: #FFFFFF;" />
                                                                                                    <%
                                                                                                Case Else
                                                                                                    %>
                                                                                                    <input id="Button41" type="button" value="<%=Row("RATE")%>" 
                                                                                                        style="border-style: solid; width: 26px; height: 22px; background-color: #FF9933;" />
                                                                                                    <%
                                                                                                End Select
                                                                                        %>
                                                                                    <a href='?<%=Row("id")%>|<%=Row("RATE")%>|-'>
                                                                                    <input id="Button3" type="button" value="-" style="width: 22px; height: 22px" />
                                                                                    </a>
                                                                                    &nbsp;&nbsp;<a title="<%=Row("TITLE")%>" href="<%=Row("link")%>">Link</a>
                                                                                    &nbsp;&nbsp;
                                                                                    <a href='?spam=<%=Row("id")%>'>
                                                                                    <input id="Button" type="button" value="spam?" style="background-color: #FF6666" />
                                                                                    </a>
                                                                                    <%
                                                                                        If Row("ADL")=True 
                                                                                            %>
                                                                                            <a href='?NOTADULT=<%=Row("id")%>'>
                                                                                            <input id="Button53" type="button" value="NO xxx?" style="background-color: #9999FF" />
                                                                                            </a>
                                                                                            <%
                                                                                        Else
                                                                                            %>
                                                                                            <a href='?ADULT=<%=Row("id")%>'>
                                                                                            <input id="Button54" type="button" value="xxx?" style="background-color: #9999FF" />
                                                                                            </a>
                                                                                            <%
                                                                                        End If
                                                                                    %>
                                                                                    <p>

                                                                        <table style="width: 100%">
	                                                                        <tr><td>
                                                                                <div id="div111" class="TabbedPanelsContent">
                                                                                    <img alt="" width="210" height="190" src="THUMBS.ASPX?var=<%=Row("link")%>" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; " />
                                                                                    <%=String.Concat("<br />",Row("link")).Replace("http://", "").Replace("https://", "")%>
	                                                                            </div>
                                                                            </td><td>
                                                                                    <%=GET_CATS(Row)%>
	                                                                        </td></tr>
                                                                        </table>
                                                                    </div>
                                                                    <div class="TabbedPanelsContent">
                                                                                        <div style="width: 360px; height: 280px; overflow: scroll;" type="text/html">
                                                                                            <% 
                                                                                                Dim _T1 As String = Nothing _
                                                                                                  , _T2 As String = Nothing _
                                                                                                  , _T3 As String = Nothing _
                                                                                                  , _T4 As String = Nothing
                                                                                                Try
                                                                                                    _T1 = Row("TITLE")
                                                                                                    _T2 = Row("DESCRIPTION")
                                                                                                    _T3 = Row("TAGS")
                                                                                                    _T4 = BYTES_TO_STRING(Row("LI"))
                                                                                                Catch ex As Exception
                                                                                                End Try
                                                                                            %>
                                                                                            <h3><%=_T1%></h3>
                                                                                            <p style="font-size: xx-small; font-family: 'Niagara Engraved';"><%=_T2%></p>
                                                                                            <p style="font-size: xx-small; font-family: 'Niagara Engraved';"><%=_T3%></p>
                                                                                            <p style="font-size: xx-small; font-family: 'Niagara Engraved';"><%=_T4%></p>
                                                                                            <a title="<%=Row("TITLE")%> in directory entry" href="?ID=<%=Row("id")%>">Link in directory entry</a><br />
                                                                                            <a title="<%=Row("TITLE")%>" href="<%=Row("link")%>">Site link</a>
                                                                                        </div>
                                                                    </div>
                                                                  </div>
                                                                </div>
                                                                <script type="text/javascript">
                                                                    var TabbedPanels<%=ID+5 %> = new Spry.Widget.TabbedPanels("TabbedPanels<%=ID+5 %>");
                                                                </script>                                            
                                                            </div>

                                                            <%
                                                        Catch ex As Exception
                                                        End Try
                                                    %>

                                                </td></tr><tr><td>

                                                    <%
                                                        Try
                                                            Dim Row As DataRow = Table.Rows(ID + 6)
                                                            CHECKING(Row)
                                                            %>
                                                            
                                                            <div style="width: 340px; height: 300px; overflow: hidden;">
                                                                <div id="TabbedPanels<%=ID+6 %>" class="TabbedPanels">
                                                                  <ul class="TabbedPanelsTabGroup">
                                                                    <li class="TabbedPanelsTab" tabindex="0">Thumbnail</li>
                                                                    <li class="TabbedPanelsTab" tabindex="0">Description</li>
                                                                  </ul>
                                                                  <div class="TabbedPanelsContentGroup">
                                                                    <div class="TabbedPanelsContent">

                                                                                    <meter value="<%=Row("RATE")%>" min="0" max="20" low="65" high="96" optimum="100">B+</meter>
                                                                                    <a href='?<%=Row("id")%>|<%=Row("RATE")%>|+'>
                                                                                    <input id="Button1" type="button" value="+" style="width: 22px; height: 22px" />
                                                                                    </a>
                                                                                        <% 
                                                                                            Select Case Row("RATE")
                                                                                                Case Is > 8
                                                                                                    %>
                                                                                                    <input id="Button42" type="button" value="<%=Row("RATE")%>" 
                                                                                                        style="border-style: solid; width: 26px; height: 22px; background-color: #00FF00;" />
                                                                                                    <%
                                                                                                Case Is > 4
                                                                                                    %>
                                                                                                    <input id="Button41" type="button" value="<%=Row("RATE")%>" 
                                                                                                        style="border-style: solid; width: 26px; height: 22px; background-color: #3399FF;" />
                                                                                                    <%
                                                                                                Case Is > -1
                                                                                                    %>
                                                                                                    <input id="Button41" type="button" value="<%=Row("RATE")%>" 
                                                                                                        style="border-style: solid; width: 26px; height: 22px; background-color: #FFFFFF;" />
                                                                                                    <%
                                                                                                Case Else
                                                                                                    %>
                                                                                                    <input id="Button41" type="button" value="<%=Row("RATE")%>" 
                                                                                                        style="border-style: solid; width: 26px; height: 22px; background-color: #FF9933;" />
                                                                                                    <%
                                                                                                End Select
                                                                                        %>
                                                                                    <a href='?<%=Row("id")%>|<%=Row("RATE")%>|-'>
                                                                                    <input id="Button3" type="button" value="-" style="width: 22px; height: 22px" />
                                                                                    </a>
                                                                                    &nbsp;&nbsp;<a title="<%=Row("TITLE")%>" href="<%=Row("link")%>">Link</a>
                                                                                    &nbsp;&nbsp;
                                                                                    <a href='?spam=<%=Row("id")%>'>
                                                                                    <input id="Button" type="button" value="spam?" style="background-color: #FF6666" />
                                                                                    </a>
                                                                                    <%
                                                                                        If Row("ADL")=True 
                                                                                            %>
                                                                                            <a href='?NOTADULT=<%=Row("id")%>'>
                                                                                            <input id="Button55" type="button" value="NO xxx?" style="background-color: #9999FF" />
                                                                                            </a>
                                                                                            <%
                                                                                        Else
                                                                                            %>
                                                                                            <a href='?ADULT=<%=Row("id")%>'>
                                                                                            <input id="Button56" type="button" value="xxx?" style="background-color: #9999FF" />
                                                                                            </a>
                                                                                            <%
                                                                                        End If
                                                                                    %>
                                                                                    <p>

                                                                        <table style="width: 100%">
	                                                                        <tr><td>
                                                                                <div id="div111" class="TabbedPanelsContent">
                                                                                    <img alt="" width="210" height="190" src="THUMBS.ASPX?var=<%=Row("link")%>" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; " />
                                                                                    <%=String.Concat("<br />",Row("link")).Replace("http://", "").Replace("https://", "")%>
	                                                                            </div>
                                                                            </td><td>
                                                                                    <%=GET_CATS(Row)%>
	                                                                        </td></tr>
                                                                        </table>
                                                                    </div>
                                                                    <div class="TabbedPanelsContent">
                                                                                        <div style="width: 360px; height: 280px; overflow: scroll;" type="text/html">
                                                                                            <% 
                                                                                                Dim _T1 As String = Nothing _
                                                                                                  , _T2 As String = Nothing _
                                                                                                  , _T3 As String = Nothing _
                                                                                                  , _T4 As String = Nothing
                                                                                                Try
                                                                                                    _T1 = Row("TITLE")
                                                                                                    _T2 = Row("DESCRIPTION")
                                                                                                    _T3 = Row("TAGS")
                                                                                                    _T4 = BYTES_TO_STRING(Row("LI"))
                                                                                                Catch ex As Exception
                                                                                                End Try
                                                                                            %>
                                                                                            <h3><%=_T1%></h3>
                                                                                            <p style="font-size: xx-small; font-family: 'Niagara Engraved';"><%=_T2%></p>
                                                                                            <p style="font-size: xx-small; font-family: 'Niagara Engraved';"><%=_T3%></p>
                                                                                            <p style="font-size: xx-small; font-family: 'Niagara Engraved';"><%=_T4%></p>
                                                                                            <a title="<%=Row("TITLE")%> in directory entry" href="?ID=<%=Row("id")%>">Link in directory entry</a><br />
                                                                                            <a title="<%=Row("TITLE")%>" href="<%=Row("link")%>">Site link</a>
                                                                                        </div>
                                                                    </div>
                                                                  </div>
                                                                </div>
                                                                <script type="text/javascript">
                                                                    var TabbedPanels<%=ID+6 %> = new Spry.Widget.TabbedPanels("TabbedPanels<%=ID+6 %>");
                                                                </script>                                            
                                                            </div>

                                                            <%
                                                        Catch ex As Exception
                                                        End Try
                                                    %>

                                                </td><td>

                                                    <%
                                                        Try
                                                            Dim Row As DataRow = Table.Rows(ID + 7)
                                                            CHECKING(Row)
                                                            %>
                                                            
                                                            <div style="width: 340px; height: 300px; overflow: hidden;">
                                                                <div id="TabbedPanels<%=ID+7 %>" class="TabbedPanels">
                                                                  <ul class="TabbedPanelsTabGroup">
                                                                    <li class="TabbedPanelsTab" tabindex="0">Thumbnail</li>
                                                                    <li class="TabbedPanelsTab" tabindex="0">Description</li>
                                                                  </ul>
                                                                  <div class="TabbedPanelsContentGroup">
                                                                    <div class="TabbedPanelsContent">

                                                                                    <meter value="<%=Row("RATE")%>" min="0" max="20" low="65" high="96" optimum="100">B+</meter>
                                                                                    <a href='?<%=Row("id")%>|<%=Row("RATE")%>|+'>
                                                                                    <input id="Button1" type="button" value="+" style="width: 22px; height: 22px" />
                                                                                    </a>
                                                                                         <% 
                                                                                            Select Case Row("RATE")
                                                                                                Case Is > 8
                                                                                                    %>
                                                                                                    <input id="Button42" type="button" value="<%=Row("RATE")%>" 
                                                                                                        style="border-style: solid; width: 26px; height: 22px; background-color: #00FF00;" />
                                                                                                    <%
                                                                                                Case Is > 4
                                                                                                    %>
                                                                                                    <input id="Button41" type="button" value="<%=Row("RATE")%>" 
                                                                                                        style="border-style: solid; width: 26px; height: 22px; background-color: #3399FF;" />
                                                                                                    <%
                                                                                                Case Is > -1
                                                                                                    %>
                                                                                                    <input id="Button41" type="button" value="<%=Row("RATE")%>" 
                                                                                                        style="border-style: solid; width: 26px; height: 22px; background-color: #FFFFFF;" />
                                                                                                    <%
                                                                                                Case Else
                                                                                                    %>
                                                                                                    <input id="Button41" type="button" value="<%=Row("RATE")%>" 
                                                                                                        style="border-style: solid; width: 26px; height: 22px; background-color: #FF9933;" />
                                                                                                    <%
                                                                                                End Select
                                                                                        %>
                                                                                    <a href='?<%=Row("id")%>|<%=Row("RATE")%>|-'>
                                                                                    <input id="Button3" type="button" value="-" style="width: 22px; height: 22px" />
                                                                                    </a>
                                                                                    &nbsp;&nbsp;<a title="<%=Row("TITLE")%>" href="<%=Row("link")%>">Link</a>
                                                                                    &nbsp;&nbsp;
                                                                                    <a href='?spam=<%=Row("id")%>'>
                                                                                    <input id="Button" type="button" value="spam?" style="background-color: #FF6666" />
                                                                                    </a>
                                                                                    <%
                                                                                        If Row("ADL")=True 
                                                                                            %>
                                                                                            <a href='?NOTADULT=<%=Row("id")%>'>
                                                                                            <input id="Button57" type="button" value="NO xxx?" style="background-color: #9999FF" />
                                                                                            </a>
                                                                                            <%
                                                                                        Else
                                                                                            %>
                                                                                            <a href='?ADULT=<%=Row("id")%>'>
                                                                                            <input id="Button58" type="button" value="xxx?" style="background-color: #9999FF" />
                                                                                            </a>
                                                                                            <%
                                                                                        End If
                                                                                    %>
                                                                                    <p>

                                                                        <table style="width: 100%">
	                                                                        <tr><td>
                                                                                <div id="div111" class="TabbedPanelsContent">
                                                                                    <img alt="" width="210" height="190" src="THUMBS.ASPX?var=<%=Row("link")%>" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; " />
                                                                                    <%=String.Concat("<br />",Row("link")).Replace("http://", "").Replace("https://", "")%>
	                                                                            </div>
                                                                            </td><td>
                                                                                    <%=GET_CATS(Row)%>
	                                                                        </td></tr>
                                                                        </table>
                                                                    </div>
                                                                    <div class="TabbedPanelsContent">
                                                                                        <div style="width: 360px; height: 280px; overflow: scroll;" type="text/html">
                                                                                            <% 
                                                                                                Dim _T1 As String = Nothing _
                                                                                                  , _T2 As String = Nothing _
                                                                                                  , _T3 As String = Nothing _
                                                                                                  , _T4 As String = Nothing
                                                                                                Try
                                                                                                    _T1 = Row("TITLE")
                                                                                                    _T2 = Row("DESCRIPTION")
                                                                                                    _T3 = Row("TAGS")
                                                                                                    _T4 = BYTES_TO_STRING(Row("LI"))
                                                                                                Catch ex As Exception
                                                                                                End Try
                                                                                            %>
                                                                                            <h3><%=_T1%></h3>
                                                                                            <p style="font-size: xx-small; font-family: 'Niagara Engraved';"><%=_T2%></p>
                                                                                            <p style="font-size: xx-small; font-family: 'Niagara Engraved';"><%=_T3%></p>
                                                                                            <p style="font-size: xx-small; font-family: 'Niagara Engraved';"><%=_T4%></p>
                                                                                            <a title="<%=Row("TITLE")%> in directory entry" href="?ID=<%=Row("id")%>">Link in directory entry</a><br />
                                                                                            <a title="<%=Row("TITLE")%>" href="<%=Row("link")%>">Site link</a>
                                                                                        </div>
                                                                    </div>
                                                                  </div>
                                                                </div>
                                                                <script type="text/javascript">
                                                                    var TabbedPanels<%=ID+7 %> = new Spry.Widget.TabbedPanels("TabbedPanels<%=ID+7 %>");
                                                                </script>                                            
                                                            </div>

                                                            <%
                                                        Catch ex As Exception
                                                        End Try
                                                    %>

                                                </td><td>

                                                    <%
                                                        Try
                                                            Dim Row As DataRow = Table.Rows(ID + 8)
                                                            CHECKING(Row)
                                                            %>
                                                            
                                                            <div style="width: 340px; height: 300px; overflow: hidden;">
                                                                <div id="TabbedPanels<%=ID+8 %>" class="TabbedPanels">
                                                                  <ul class="TabbedPanelsTabGroup">
                                                                    <li class="TabbedPanelsTab" tabindex="0">Thumbnail</li>
                                                                    <li class="TabbedPanelsTab" tabindex="0">Description</li>
                                                                  </ul>
                                                                  <div class="TabbedPanelsContentGroup">
                                                                    <div class="TabbedPanelsContent">

                                                                                    <meter value="<%=Row("RATE")%>" min="0" max="20" low="65" high="96" optimum="100">B+</meter>
                                                                                    <a href='?<%=Row("id")%>|<%=Row("RATE")%>|+'>
                                                                                    <input id="Button1" type="button" value="+" style="width: 22px; height: 22px" />
                                                                                    </a>
                                                                                        <% 
                                                                                            Select Case Row("RATE")
                                                                                                Case Is > 8
                                                                                                    %>
                                                                                                    <input id="Button42" type="button" value="<%=Row("RATE")%>" 
                                                                                                        style="border-style: solid; width: 26px; height: 22px; background-color: #00FF00;" />
                                                                                                    <%
                                                                                                Case Is > 4
                                                                                                    %>
                                                                                                    <input id="Button41" type="button" value="<%=Row("RATE")%>" 
                                                                                                        style="border-style: solid; width: 26px; height: 22px; background-color: #3399FF;" />
                                                                                                    <%
                                                                                                Case Is > -1
                                                                                                    %>
                                                                                                    <input id="Button41" type="button" value="<%=Row("RATE")%>" 
                                                                                                        style="border-style: solid; width: 26px; height: 22px; background-color: #FFFFFF;" />
                                                                                                    <%
                                                                                                Case Else
                                                                                                    %>
                                                                                                    <input id="Button41" type="button" value="<%=Row("RATE")%>" 
                                                                                                        style="border-style: solid; width: 26px; height: 22px; background-color: #FF9933;" />
                                                                                                    <%
                                                                                                End Select
                                                                                        %>
                                                                                    <a href='?<%=Row("id")%>|<%=Row("RATE")%>|-'>
                                                                                    <input id="Button3" type="button" value="-" style="width: 22px; height: 22px" />
                                                                                    </a>
                                                                                    &nbsp;&nbsp;<a title="<%=Row("TITLE")%>" href="<%=Row("link")%>">Link</a>
                                                                                    &nbsp;&nbsp;
                                                                                    <a href='?spam=<%=Row("id")%>'>
                                                                                    <input id="Button" type="button" value="spam?" style="background-color: #FF6666" />
                                                                                    </a>
                                                                                    <%
                                                                                        If Row("ADL")=True 
                                                                                            %>
                                                                                            <a href='?NOTADULT=<%=Row("id")%>'>
                                                                                            <input id="Button59" type="button" value="NO xxx?" style="background-color: #9999FF" />
                                                                                            </a>
                                                                                            <%
                                                                                        Else
                                                                                            %>
                                                                                            <a href='?ADULT=<%=Row("id")%>'>
                                                                                            <input id="Button60" type="button" value="xxx?" style="background-color: #9999FF" />
                                                                                            </a>
                                                                                            <%
                                                                                        End If
                                                                                    %>
                                                                                    <p>

                                                                        <table style="width: 100%">
	                                                                        <tr><td>
                                                                                <div id="div111" class="TabbedPanelsContent">
                                                                                    <img alt="" width="210" height="190" src="THUMBS.ASPX?var=<%=Row("link")%>" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; " />
                                                                                    <%=String.Concat("<br />",Row("link")).Replace("http://", "").Replace("https://", "")%>
	                                                                            </div>
                                                                            </td><td>
                                                                                    <%=GET_CATS(Table.Rows(ID + 8))%>
	                                                                        </td></tr>
                                                                        </table>
                                                                    </div>
                                                                    <div class="TabbedPanelsContent">
                                                                                        <div style="width: 360px; height: 280px; overflow: scroll;" type="text/html">
                                                                                            <% 
                                                                                                Dim _T1 As String = Nothing _
                                                                                                  , _T2 As String = Nothing _
                                                                                                  , _T3 As String = Nothing _
                                                                                                  , _T4 As String = Nothing
                                                                                                Try
                                                                                                    _T1 = Row("TITLE")
                                                                                                    _T2 = Row("DESCRIPTION")
                                                                                                    _T3 = Row("TAGS")
                                                                                                    _T4 = BYTES_TO_STRING(Row("LI"))
                                                                                                Catch ex As Exception
                                                                                                End Try
                                                                                            %>
                                                                                            <h3><%=_T1%></h3>
                                                                                            <p style="font-size: xx-small; font-family: 'Niagara Engraved';"><%=_T2%></p>
                                                                                            <p style="font-size: xx-small; font-family: 'Niagara Engraved';"><%=_T3%></p>
                                                                                            <p style="font-size: xx-small; font-family: 'Niagara Engraved';"><%=_T4%></p>
                                                                                            <a title="<%=Row("TITLE")%> in directory entry" href="?ID=<%=Row("id")%>">Link in directory entry</a><br />
                                                                                            <a title="<%=Row("TITLE")%>" href="<%=Row("link")%>">Site link</a>
                                                                                        </div>
                                                                    </div>
                                                                  </div>
                                                                </div>
                                                                <script type="text/javascript">
                                                                    var TabbedPanels<%=ID+8 %> = new Spry.Widget.TabbedPanels("TabbedPanels<%=ID+8 %>");
                                                                </script>                                            
                                                            </div>

                                                            <%
                                                        Catch ex As Exception
                                                        End Try
                                                    %>

                                                </td></tr>
                                            </table>

                                        <br /><hr />
                               
                                        <%                                                  
                                                
                                                End If
                                        
                                                IIID += 9
                                                ID += 9
                                           
                                    Next
                                    '----------------   
                                %>        

                                <%

                                    If HttpContext.Current.Session("CUR_PAGE_ID") > 1 Then
                                        %>
                                        <asp:Button ID="btn_nav_1" runat="server" Text="&lt;" />
                                        <%
                                    End If
                                    
                                        Dim [_P_0] As Integer _
                                                = Math.Max(HttpContext.Current.Session("CUR_PAGE_ID") - 16, 1) _
                                          , [_P_END] As Integer _
                                                = Math.Min(HttpContext.Current.Session("CUR_PAGE_ID") + 16, (Table.Rows.Count - 1) / 9)
                                    For ID As Integer = [_P_0] To [_P_END]
                                        Select Case ID
                                            Case HttpContext.Current.Session("CUR_PAGE_ID")
                                                %>
                                                    <a href="?<%=ID %>"><strong><span style="background-color: #FFFF00;"><%=ID%></span></strong></a>
                                                <%
                                            Case Else
                                                %>
                                                    <a href="?<%=ID %>"><%=ID%></a>
                                                <%
                                        End Select
                                    Next
                                
                                    If HttpContext.Current.Session("CUR_PAGE_ID") < (Table.Rows.Count - 1) / 9 Then
                                        %>
                                        <asp:Button ID="btn_nav_2" runat="server" Text="&gt;" />
                                        <%
                                    End If

                                    If HttpContext.Current.Session("CUR_PAGE_ID") > 0 Then
                                        HttpContext.Current.Session("CUR_PAGE_ID") = 0
                                    End If
                                        
                                %>

                                  <%--ADD ROW---%>
                                  <%--ADD ROW---%>

                            </div>

                          <%
                          '
                      End If
                  %>

              </asp:Panel>  
</asp:Content>